import { ObjCreate } from "../common/ObjCreate";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { LoaderHelp } from "../../../common/display/LoaderHelp";
import { ResFileConst } from "../../resource/ResFileConst";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../resource/ImagesConst";
import { Language } from "../../../../extend/language/Language";
//class DateTipSp
    
    export  class DateTipSp /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.initView();
            return;
        }

        /* internal  */initView(): void
        {
            this._sbmLabelBg = ObjCreate.createBitmap("", 0, 0, this);
            this._dateTx = ObjCreate.createTextField("", 13, 4, 54, 18, this, GlobalStyle.textFormat6);
            LoaderHelp.addResCallBack(ResFileConst.kingWar, this.onLoadBmResource);
            return;
        }

        /* internal  */onLoadBmResource(): void
        {
            this._sbmLabelBg.bitmapData = GlobalClass.getBitmapData(ImagesConst.kingWar_dateBg);
            return;
        }

        public updateInfo(arg1: Date): void
        {
            if (arg1) 
            {
                this._dateTx.text = Language.getStringByParam(70409, arg1.getMonth() + 1, arg1.getDate());
            }
            return;
        }

        /* internal */ /* var */_sbmLabelBg: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_dateTx: Object /* flash.text.TextField */;
    }
